<?php 

class Zen_Controller_Action_Helper_IncludeRes extends Zend_Controller_Action_Helper_Abstract
{
	public function direct($action_resources){
		if (! $action_resources || ! is_array($action_resources))
			return false;
		$action = $this->getActionController();
		$helper = new Zend_Controller_Action_HelperBroker($action);
		$request = $this->getRequest();
		$action_name = $request->getActionName(); 
		foreach ($action_resources as $action => $resources) {
			if ( $action_name != $action )
				continue;
			if (! $resources || ! is_array($resources))
				continue;
			$helper->incLocalRes($resources);
			break;
		}
	}
}